package com.emergency.embackend.mapper;

import com.emergency.embackend.entity.HelpComment;
import com.emergency.embackend.entity.HelpData;
import com.emergency.embackend.vo.HelpDetailVo;
import com.emergency.embackend.vo.HelpOneVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface HelpDataMapper {
    void add(HelpData helpData, Long userId);

    void delete(String helpId, Long userId);

    void update(HelpData helpData);

    List<HelpOneVo> pageByUser(Long userId);

    List<HelpOneVo> pageAll();

    HelpDetailVo getOne(@Param("helpId") Long helpId);

    void addComment(HelpComment helpComment);

    int getHot(Long helpId);

    void updateHot(int hot, Long helpId);

    List<HelpComment> getComment(Long helpId);

    Long getDataInWeek(Long id);

    Long getDataInMonth(Long id);

    List<HelpOneVo> hotByUptime();

    void changeHot(int hot, Long helpId);

    Long getViewCount(Long helpId);
}
